/*
 * Copyright Thoughtworks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@use "sass:map";
@import "font-awesome-sprockets";


// Capitalization here needs to match the font file names in vendor/assets/fonts/opensans
// stylelint-disable value-keyword-case
$opensans-variants: (
  Light:(
    font-weight: 300,
    font-style: normal,
  ),
  LightItalic:(
    font-weight: 300,
    font-style: italic,
  ),
  Regular:(
    font-weight: normal,
    font-style: normal,
  ),
  Italic:(
    font-weight: normal,
    font-style: italic,
  ),
  Semibold:(
    font-weight: 600,
    font-style: normal,
  ),
  SemiboldItalic:(
    font-weight: 600,
    font-style: italic,
  ),
  Bold:(
    font-weight: bold,
    font-style: normal,
  ),
  BoldItalic:(
    font-weight: bold,
    font-style: italic,
  ),
  ExtraBold:(
    font-weight: 800,
    font-style: normal,
  ),
  ExtraBoldItalic:(
    font-weight: 800,
    font-style: italic,
  ),
);
// stylelint-enable value-keyword-case

@each $variant-name in map.keys($opensans-variants) {
  $variant: map.get($opensans-variants, $variant-name);

  @include font-face(
    $font-family: "Open Sans",
    $file-path: "opensans/OpenSans-#{$variant-name}-webfont",
    $file-formats: ("woff"),
    $asset-pipeline: true) {
    font-style: map.get($variant, "font-style");
    font-weight: map.get($variant, "font-weight");
  }
}
